package com.gy.ai.agent.platform.dashscope.entity;

import com.gy.ai.agent.core.BaseResponse;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author LGY
 * Create by 2025/6/19 17:02
 */
@Data
@Accessors(chain = true)
public class DashscopePlatformRerankResp extends BaseResponse implements Serializable {

    private Output output;

    private String request_id;

    private Usage usage;

    @Data
    @Accessors(chain = true)
    public static class Usage implements Serializable {
        private Long total_tokens;
    }

    @Data
    @Accessors(chain = true)
    public static class Output implements Serializable {
        private List<RerankResult> results;
    }

    @Data
    @Accessors(chain = true)
    public static class RerankResult implements Serializable {
        private Document document;
        private Integer index;
        private BigDecimal relevance_score;
    }

    @Data
    @Accessors(chain = true)
    public static class Document implements Serializable {
        private String text;
    }
}
